  <%= f.error_messages %>
  
  <p>
    <%= f.label :name %>
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :os %>
    <%= f.text_field :os %>
  </p>
  <p>
    <%= f.label :mac_address %>
    <%= f.text_field :mac_address %>
  </p>
  <p>
    <%= f.label :ip_address %>
    <%= f.text_field :ip_address%> 
    <%= image_tag "ajax-loader.gif", :id=>"wait_icon", :style=>"display:none" %>
    <span id="computerStatusImg">
    	<%= image_tag('circle_Red.png') %>
    </span>
  </p>
  <p>
    <%= f.label :start_date %>
    <%= f.date_select :start_date %>
  </p>
  <p>
    <%= f.label :status %>
    <%= f.select(:status, Computer::COMPUTER_STATUS.map {|c| [c[1], c[0]]})%>
  </p>
  <p>
    <%= f.label :room_id %>
    <% rooms = Room.all %>
    <%= f.select(:room_id, rooms.collect {|c| ["#{c.company.name} : #{c.code}", c.id] }, :prompt => "Select room")%>
  </p>
  <p>
    <%= f.label :network_id %>
    <% networks = Network.all %>
    <%= f.select(:network_id, networks.collect {|c| [c.name, c.id] }, :prompt => "Select network", :include_blank => true)%>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
  <%= observe_field :computer_ip_address,
    :url=>{:controller => :computers, :action=>:validateIp},  
    :before => "Element.toggle('wait_icon')",
    :complete => "Element.toggle('wait_icon')",
    :with => "'ip='+escape(value)"
  %>

  <%= observe_field :computer_network_id,
    :url=>{:controller => :computers, :action=>:get_rooms},
    :with => "'network_id='+escape(value)"
  %>

  <%= observe_field :computer_room_id,
    :url=>{:controller => :computers, :action=>:get_networks},
    :with => "'room_id='+escape(value)"
  %>